package com.woldier.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

//@Controller
//public class UserController {
//
//    @RequestMapping(value = "users/{id}",method = RequestMethod.DELETE)
//    @ResponseBody
//    public String delete( @PathVariable Integer id){
//        System.out.println("id = " + id);
//        return "id is " + id ;
//    }
//
//}

@RestController
@RequestMapping("/users") // 指定总目录
public class UserController {

    @DeleteMapping("/{id}")
    public String delete( @PathVariable Integer id){
        System.out.println("id = " + id);
        return "id is " + id ;
    }

}
